home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12920 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: misery.millcomm.com!usenet
  2. From: danhicks@millcomm.com (Dan Hicks)
  3. Newsgroups: comp.lang.misc,comp.lang.c,comp.lang.pl1,comp.lang.apl
  4. Subject: Re: GOTO controversy
  5. Date: 3 Apr 1996 15:21:36 GMT
  6. Organization: Millennium Communications, Inc.
  7. Message-ID: <4ju520$oq5@misery.millcomm.com>
  8. References: <314FB5F5.259B@simi.is> <3151B47F.70FD@connix.com> <4jo5t6$1ki@socrates.moe.edu.sg> <4jq2en$g2q@news.cais.com> <AD87DB279668D9F74@mcdiala15.it.luc.edu>
  9. Reply-To: danhicks@millcomm.com
  10. NNTP-Posting-Host: dial-06.roch.millcomm.com
  11. X-Newsreader: IBM NewsReader/2 v1.2
  12.  
  13. In <AD87DB279668D9F74@mcdiala15.it.luc.edu>, VArase@varase.it.luc.edu (Verne Arase) writes:
  14. >I avoid recursion in _any_ production code, no matter how I can minimize
  15. >the stack frame.
  16. >
  17. >Recursion can make for visually appealing and simplified code, but in real
  18. >terms they're nothing but trouble unless you can absolutely positively
  19. >guarantee a finite, known level stack depth.
  20.  
  21. I use recursion where recursion is appropriate.  (In my mind, using 
  22. recursion to avoid a simple loop ISN'T appropriate, though.) 
  23. Unconditionally avoiding recursion is just as ill-advised as abusing it 
  24. -- some of the worst code I've seen is code where recursion would have 
  25. made a big difference (had the programmer understood the concept).
  26.  
  27. On the other hand, recursing is something I do a lot of, fairly 
  28. unconditionally.  8-)
  29.  
  30. Dan Hicks
  31. http://www.millcomm.com/~danhicks/
  32.  
  33.